#Tests for outbound solution configuration
#TestHandler(), Cutting logs, etc.

def test00():
  """this is a simple test"""
  print TestHandler()
  pass

def test0():
  DN2.SendTVUserEvent()
  marker1 = LocalTserver.MarkLog()
  DN1.MakeCall(DN2)
  marker2 = LocalTserver.MarkLog()
  LocalTserver.SeriousError("QQQQQQQQQQ")
  DN1.ReleaseCall()
  LocalTserver.CutLog(marker1)
  DN1.SendTVUserEvent()
  LocalTserver.CutLog(marker2)
  TestHandler().ForceCutTestLogs([DBServer1, LocalTserver])
 

def test1():
  LocalTserver.SeriousError("QQQQQQQQQQ")
  Campaign1Group1.LoadCampaign()
  Campaign1Group1.StartDialing(dialMode = CfgDialMode.Predict)
  Campaign1Group1.SetDialingMode(optimizeGoal = 60)
  Campaign1Group1.StopDialing()
  Campaign1Group1.UnloadCampaign()
  TestHandler().ForceCutTestLogs([DBServer1, LocalTserver])
 
def test2():
  LocalTserver.Error("QQQQQQQQQQ")
  SolutionControlServer.SeriousError( "QQQQQQQQQQ")
  DN1.MakeCall(DN2)
  DN1.ReleaseCall()
  ScsAppLocalTserver.Stop()
  ScsAppLocalTserver.Start()
  DN1.MakeCall(DN2)
  DN1.ReleaseCall()
  LocalTserver.Error("QQQQQQQQQQ")
  ScsAppLocalTserver.Stop()
  ScsAppLocalTserver.Start()
  DN1.MakeCall(DN2)
  DN1.ReleaseCall()


def test3():
  m1 = LocalTserver.MarkLog()
  DN1.MakeCall(DN2)
  DN1.ReleaseCall()
  log = LocalTserver.CutLog(m1)
  if log:
    (piece, path) = log
    print piece
    print path
  pass  


